//
//  ByRegisterApiUser.h
//  oc_knowledge
//
//  Created by justiOS on 17/1/11.
//  Copyright © 2017年 com.itboye. All rights reserved.
//

#import "ByNetBaseApi.h"

// model
#import "ByModelUser.h"


#define code_log_debug 1

#if code_log_debug == 1
#define CodeLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define CodeLog(...)
#endif


@interface ByApiUser : ByNetBaseApi
/** 发送验证码 */
+ (void)getCode:(ByNetParamsModel *)model
        success:(void(^)(ByNetBaseResult *result))success
        failure:(void(^)(ByNetBaseResult *result))failure;

/** 登陆 */
+ (void)login:(ByNetParamsModel *)model
      success:(void(^)(ByNetBaseResult *result))success
      failure:(void(^)(ByNetBaseResult *result))failure;

/** 注册 */
+ (void)reigster:(ByNetParamsModel *)model
         success:(void(^)(ByNetBaseResult *result))success
         failure:(void(^)(ByNetBaseResult *result))failure;

/** 手机找密 */
+ (void)retrievePwd:(ByNetParamsModel *)model
            success:(void(^)(ByNetBaseResult *result))success
            failure:(void(^)(ByNetBaseResult *result))failure;

/** 手机验证码登陆 */
+ (void)loginWithCode:(ByNetParamsModel *)model
              success:(void(^)(ByNetBaseResult *result))success
              failure:(void(^)(ByNetBaseResult *result))failure;

/** 修改密码 */
+ (void)changePwd:(ByNetParamsModel *)model
          success:(void(^)(ByNetBaseResult *result))success
          failure:(void(^)(ByNetBaseResult *result))failure;


/** 修改密码 - 邮箱 */
+ (void)changePwdwithmail:(ByNetParamsModel *)model
                  success:(void(^)(ByNetBaseResult *result))success
                  failure:(void(^)(ByNetBaseResult *result))failure;


/** 用户更新 */
+ (void)updateUserInfo:(ByNetParamsModel *)model
               success:(void(^)(ByNetBaseResult *result))success
               failure:(void(^)(ByNetBaseResult *result))failure;


/** 注销账户 */
+ (void)deleteAccounts:(ByNetParamsModel *)model
               success:(void(^)(ByNetBaseResult *result))success
               failure:(void(^)(ByNetBaseResult *result))failure;


/** 头像上传 返回数据为字典 */
+ (void)iconUpload:(UIImage *)icon
           success:(void(^)(ByNetBaseResult *result))success
           failure:(void(^)(ByNetBaseResult *result))failure;


// 单图上传
+ (void)uploadCer:(UIImage *)img
          success:(void(^)(ByNetBaseResult *result))success
          failure:(void(^)(ByNetBaseResult *result))failure;


@end
